<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@taglib uri="/WEB-INF/struts-bean.tld"prefix="bean" %>
<%@page import="Model.*" %>
<%@page import="bean.Product" %>
<%@page import="java.util.*"%>
<table  />
<tr><td>
<logic:present name="customer" scope="session">
    <span style="color:#0000FF">Xin chao<bean:write name="customer" property="userName" /></span>
    <html:form action="/client/pages/logout" >
        <% bean.Customer cus = (bean.Customer)session.getAttribute("customer"); %>
        <html:hidden property="userName" value= "<%= cus.getUserName()%>" />
        <html:hidden property="passw" value = "<%= cus.getPassw()%>" />
        <html:submit value="Log out" />
    </html:form>
    
</logic:present></td></tr>
<tr><td>
        <h4>san pham ban chay</h4>
<table width="100%" border="0">

<% ArrayList<Product> pros = ProModel.getProByOrder();
Iterator<Product> it = pros.iterator();
                                  Product pro;
                                  while(it.hasNext())
                                      {pro=it.next();
%>
<tr>
		            <td>
		              <table width="100%">
		                 <tr><td align="center">
                                        <img src="../products/<%=pro.getImage()%>" style="width:120px; height:200px" />
		                  </td></tr>
                                        <tr>
                                        <td align="center">gia: <%=pro.getPrice()%> VND</td></tr>
                                        <tr>
                                        <td align="center">Hang: <%=pro.getBrand()%> ;  </td></tr>
                                        <tr>
                                         <td align="center" >
                                             <html:form  action="/client/pages/shopingCart">
                                            <% String ID = Long.toString(pro.getIDpro()); %>

                                        <html:hidden property="IDpro" value="<%=ID%>" />
                                        <html:image  src="../picture/giohang.png" property="submit"/>
                                        </html:form>
                                         </td></tr>
		                </table>
                            </td>
    </tr><% } %>
</table>